<!DOCTYPE html>
<html lang="en">
<head>
	<title></title>
	<meta charset="UTF-8"/>
	<meta name="viewport" content="width=device-width, initial-scale=1.0"/>
	<link rel="stylesheet" href="__PUBLIC__/Admin/css/bootstrap.min.css?v={#$Think.config.ADMIN_VERSION_VAL}"/>
	<link rel="stylesheet" href="__PUBLIC__/Admin/css/bootstrap-responsive.min.css?v={#$Think.config.ADMIN_VERSION_VAL}"/>
	<link rel="stylesheet" href="__PUBLIC__/Admin/css/uniform.css?v={#$Think.config.ADMIN_VERSION_VAL}"/>
	<link rel="stylesheet" href="__PUBLIC__/Admin/css/matrix-style2.css?v={#$Think.config.ADMIN_VERSION_VAL}"/>
	<link rel="stylesheet" href="__PUBLIC__/Admin/css/matrix-media.css?v={#$Think.config.ADMIN_VERSION_VAL}"/>
	<link rel="stylesheet" href="__PUBLIC__/Admin/font-awesome/css/font-awesome.css?v={#$Think.config.ADMIN_VERSION_VAL}"/>
	<link rel="stylesheet" href="__PUBLIC__/Admin/css/changyun.css?v={#$Think.config.ADMIN_VERSION_VAL}"/>
	<style>
		.table th, .table td {
			line-height: 20px;
			text-align: center;
			border-top: 1px solid #ddd;
			padding: 5px 0 5px 10px;
			vertical-align: middle;
		}
	</style>
</head>
<body>
<div id="content">
	<include file="Public/maintop"/>
	<div class="container-fluid">
		<div class="row-fluid">
			<div class="span12">
				<div class="widget-box">
					<div class="cyz-m-tab">
						<ul class="cyz-m-tab-title">
							<li class="cyz-m-this" href="javascript:void(0);">文章管理</li>
						</ul>
					</div>

					<div class="widget-content" style="padding:5px;border:0px;">
						<form action="__ACTION__" method="get">
							<div class="fr table-button">
								<button type="submit" class="btn btn-success"><i class="icon-search"></i> 搜索</button>
							</div>
							<div class="fr table-button">
								<select style="width:150px;" name="article_status">
									<option value="0">文章状态</option>
									<option value="-1"
									<if condition="$Think.get.article_status eq -1">selected</if>
									>待审核</option>
									<option value="1"
									<if condition="$Think.get.article_status eq 1">selected</if>
									>审核成功</option>
									<option value="2"
									<if condition="$Think.get.article_status eq 2">selected</if>
									>审核失败</option>
								</select>
								<input type="text" name="name" placeholder="请输入文章标题" value="{#$Think.get.name}">
							</div>
						</form>
					</div>

					<div class="widget-content" style="padding:5px;">
						<table class="table table-bordered table-striped" style="margin-bottom: 0px;">
							<thead>
							<tr>
								<th width="50" style="text-align:center;">ID</th>
								<th width="200">作者</th>
								<th>文章分类</th>
								<th>文章标题</th>
								<th width="80">文章缩略图</th>
								<th>文章类型</th>
								<th width="100">文章状态</th>
								<th width="100">删除状态</th>
								<th width="150">添加时间</th>
								<th width="120">操作</th>
							</tr>
							</thead>
							<tbody>
							<notempty name="list_data.list_data">
								<volist name="list_data.list_data" id="data">
									<tr class="text-c">
										<td align="center">{#$data.id}</td>
										<td style="text-align: left;">
											<div rel="pop" style="display: flex">
												<img style="width: 40px;height: 40px;border-radius: 50%;border:1px solid #efefef;" src="{#$data.c_touxiang}">
												<span style="display: flex;flex-direction: column;justify-content: center;align-items: flex-start;padding-left: 5px">
								   <span class="nickname">
									   {#$data.c_cn_true_name}<br>
									   手机号码：{#$data.c_phone}<br>
								   </span>
							</span>
											</div>
										</td>
										<td style="text-align: left;">
											{#$data.cate_name}
										</td>
										<td style="text-align: left;">
											{#$data.title}
										</td>
										<td>
											<neq name="data.lit_pic" value="">
												<a href="{#$data.lit_pic}" target="_blank"><img src="{#$data.lit_pic}" style="width: 50px;height: 50px;"/></a>
											</neq>
										</td>
										<td>
											<if condition="$data.content_type ==1">
												<span class="btn btn-mini btn-success">内容</span>
											</if>
											<if condition="$data.content_type ==2">
												<span class="btn btn-mini btn-warning">视频</span>
											</if>
											<if condition="$data.content_type ==3">
												<span class="btn btn-mini btn-default">链接</span>
											</if>
											<if condition="$data.content_type ==4">
												<span class="btn btn-mini btn-primary">文件</span>
											</if>
										</td>
										<td>
											<if condition="$data.article_status == 0">
												<span class="btn btn-mini btn-danger">待审核</span>
											</if>
											<if condition="$data.article_status == 1">
												<span class="btn btn-mini btn-success">审核通过</span>
											</if>
											<if condition="$data.article_status == 2">
												<span class="btn btn-mini btn-danger">审核失败</span>
											</if>
										</td>
										<td>
											<if condition="$data.is_delete ==0">
												<span class="btn btn-mini btn-success">未删除</span>
												<else/>
												<span class="btn btn-mini btn-danger">已删除</span>
											</if>
										</td>
										<td>

											{#$data.created_at}
										</td>
										<td class="f-14 td-manage">
											<div class="am-btn-group">
												<a style="text-decoration:none" class="btn btn-mini btn-success" href="{#:U('edit?id='.$data['id'])}"><i class="icon-eye-open"></i> 详情</a>
												<if condition="$data.is_delete ==0">
													<a style="text-decoration:none" class="btn btn-mini btn-danger" onclick="dodel('{#:U('del?id='.$data['id'])}')" title="删除"><i class="icon-remove"></i> 删除</a>
												</if>
											</div>
										</td>
									</tr>
								</volist>
								<else/>
								<td colspan="7" class="text-center"> 暂时还没有问题内容!</td>
							</notempty>
							</tbody>
						</table>
						<div id="hongxin_page_view">{#$list_data._page}</div>
					</div>
				</div>
			</div>
		</div>
	</div>
</div>

<script src="__PUBLIC__/Admin/js/jquery.min.js"></script>
<script src="__PUBLIC__/Admin/js/jquery.ui.custom.js"></script>
<script src="__PUBLIC__/Admin/js/bootstrap.min.js"></script>
<script src="__PUBLIC__/Admin/js/jquery.uniform.js"></script>
<script src="__PUBLIC__/Admin/js/matrix.js"></script>
<script src="__PUBLIC__/Admin/js/matrix.tables.js"></script>
<script src="__PUBLIC__/js/layer/layer.js"></script>
<script>
function dodel(jump_url) {
	layer.confirm('确定要删除吗', {
		title: '提示',
		icon: 0,
		btn: ['确定', '取消'] //按钮
	}, function(e) {
		window.location.href = jump_url;
		layer.close(e);
	}, function(e) {
		layer.close(e);
	});
}

function changstatus(field, status, aid, e) {
	var loadi = null;
	loadi = layer.load(2);
	$.ajax({
		type: "GET",
		url: "__CONTROLLER__/setstatus",
		data: {field: field, status: status, aid: aid},
		dataType: "html",
		success: function(data) {
			layer.close(loadi);
			$(e).parent("td").html(data);
		},
		error: function(XMLHttpRequest, textStatus, errorThrown) {

		}
	});
}

function actionGoods(atype) {
	var gid = '';
	$.each($("input[name='check_id']"), function() {
		if (this.checked) {
			gid = gid + $(this).val() + ',';
		}
	});
	if (gid == '') {
		layer.alert('请选择要操作的商品', {icon: 0});
		return false;
	}
	layer.confirm('确定要进行该操作吗', {
		title: '提示',
		icon: 0,
		btn: ['确定', '取消'] //按钮
	}, function(e) {
		var loadi = null;
		loadi = layer.load(2);
		$.ajax({
			type: "GET",
			data: {ids: gid, atype: atype, _: Date.now()},
			dataType: "json",
			url: "{#:U('actionAllGoods')}",
			success: function(rdata) {
				layer.close(e);
				layer.close(loadi);
				if (rdata.status == 1) {
					layer.alert(rdata.msg, {icon: 1}, function() {
						window.location.reload();
					});
					return false;
				} else {
					layer.alert(rdata.msg, {icon: 0});
					return false;
				}
			}
		});
	}, function(e) {
		layer.close(e);
	});
}
</script>
</body>
</html>
